/*const {injectBabelPlugin} = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less');
module.exports = function override(config, env) {
    config = injectBabelPlugin(['import', {libraryName: 'antd', libraryDirectory: 'es', style: true}], config);
    config = rewireLess.withLoaderOptions({
        modifyVars: {"@primary-color": "#1DA57A"},
        javascriptEnabled: true,
    })(config, env);
    config = injectBabelPlugin(['@babel/plugin-proposal-decorators', {"legacy": true}], config);
    return config;
};*/

const {override, fixBabelImports, addLessLoader,addBabelPlugin} = require('customize-cra');

module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,
    }),
    addBabelPlugin(['@babel/plugin-proposal-decorators', {
        legacy: true,
    }]),
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {'@primary-color': '#1DA57A'},
    }),
);